import Index from "../page/Index"
import Cart from "../page/Cart"
import Cate from "../page/Cate"
import Goodsdetail from "../page/Goodsdetail"
import Goodslist from "../page/Goodslist"
import Login from "../page/Login"
import Reg from "../page/Reg"
import Unceter from "../page/Unceter"
import Coupon from "../page/Coupon"

const rules = [{
        path: "/coupon",
        component: Coupon,
        exact: false,
        meta: {
            mustLogin: true,
            title: "优惠券"
        }
    },
    {
        path: "/",
        redirect: "/index",
        exact: true,
        meta: {
            mustLogin: false
        }
    },
    {
        path: "/index",
        component: Index,
        exact: false,
        meta: {
            mustLogin: false,
            title: "小U商城"
        }
    },
    {
        path: "/cart",
        component: Cart,
        exact: false,
        meta: {
            mustLogin: true,
            title: "购物车"
        }
    },
    {
        path: "/cate",
        component: Cate,
        exact: false,
        meta: {
            mustLogin: false,
            title: "商品分类"
        }
    },
    {
        path: "/unceter",
        component: Unceter,
        exact: false,
        meta: {
            mustLogin: true,
            title: "个人中心"
        }
    },
    {
        path: "/goods_detail",
        component: Goodsdetail,
        exact: false,
        meta: {
            mustLogin: false,
            title: "商品详情"
        }
    },
    {
        path: "/goods_list",
        component: Goodslist,
        exact: false,
        meta: {
            mustLogin: false,
            title: "商品列表"
        }
    },
    {
        path: "/login",
        component: Login,
        exact: false,
        meta: {
            mustLogin: false,
            title: "用户登录"
        }
    },
    {
        path: "/reg",
        component: Reg,
        exact: false,
        meta: {
            mustLogin: false,
            title: "用户注册"
        }
    }
]

export default rules